package org.blogwu.learn.multithread.chapter6.class2;

import java.util.Arrays;
import java.util.List;
import java.util.function.Function;

import static java.lang.System.out;

public class Main1 {

    public static void main(String[] args) {
        List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9);
//              numbers.forEach(( value) -> out.println(value));
        numbers.forEach((Integer value) -> out.println(value));
        out.println("------");
        final int num = 2;
        Function<Integer, Integer> stringConverter = (Integer from) -> from * num;
//                Function<Integer,Integer> stringConverter=(from) -> from*num;
        out.println(stringConverter.apply(3));

    }
}
